﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="RWGLSearch.aspx.cs" Inherits="WXYW.RWGLSearch" %>

<%@ Register Namespace="WXYW.Controls" TagPrefix="WXYWControl" Assembly="WXYW.Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    任务管理 - 查询
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
    <table width="100%" style="line-height: 25px">
        <tr>
            <td colspan="2" align="center" style="font-size: 11pt;">
                <b>查询结果</b>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <WXYWControl:CustomGridView ID="taskGridView" CssClass="tableList" runat="server"
                    AutoGenerateColumns="False" AllowPaging="True" Width="100%" BorderColor="#888888"
                    OnPageIndexChanging="taskGridView_PageIndexChanging" OnRowDataBound="taskGridView_RowDataBound"
                    OnMustAddARow="GridView_MustAddARow" OnDataBound="taskGridView_DataBound">
                    <Columns>
                        <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                            <ItemTemplate>
                                <asp:Label ID="IDLbl" runat="server"></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="预警">
                            <ItemTemplate>
                                <asp:Label ID="overdueLabel" runat="server" Text="" ForeColor="Red"></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="创建人">
                            <ItemTemplate>
                                <%#Eval("User1.ContactPerson")%>
                            </ItemTemplate>
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="执行人员">
                            <ItemTemplate>
                                <%#Eval("User.ContactPerson")%>
                            </ItemTemplate>
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="任务主题" DataField="Subject" >
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="任务类型" DataField="TaskType" >
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                        </asp:BoundField>
                        <%--<asp:BoundField HeaderText="详细描述" DataField="Content" />
            <asp:BoundField HeaderText="处理结果" DataField="Result" />--%>
                        <asp:TemplateField HeaderText="创建日期">
                            <ItemTemplate>
                                <%#Convert.ToDateTime(Eval("CreateDate")).ToString("yyyy-MM-dd")%>
                            </ItemTemplate>
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="预定完成日期">
                            <ItemTemplate>
                                <%#Convert.ToDateTime(Eval("ShouldCompleteDate")).ToString("yyyy-MM-dd")%>
                            </ItemTemplate>
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="完成日期" DataFormatString="{0:yyyy-MM-dd}" DataField="CompleteDate">
                            <%-- <ItemTemplate>
                    <%#Eval("CompleteDate")%>
                </ItemTemplate>--%><HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="问题类型" DataField="ReasonType" >
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="问题原因类型" DataField="ResultType" >
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="处理状态" DataField="Status" >
                        <HeaderStyle Wrap="False" />
                        <ItemStyle Wrap="False" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <img src="image/operateicon/docview.gif" alt="" />
                                <asp:LinkButton ID="modifyLinkButton" OnClick="modifyLinkButton_click" CommandArgument='<%#Eval("ID") %>'
                                    runat="server">查看</asp:LinkButton>
                            </ItemTemplate>
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:TemplateField>
                    </Columns>
                    <PagerTemplate>
                        本类记录<span style="color: Red"><%= taskGridView.Rows.Count %></span>条, <span style="color: Red">
                            10</span>条/页 当前 <span style="color: Red">
                                <%= taskGridView.PageIndex + 1%>/<%= taskGridView.PageCount%></span>页
                        <asp:LinkButton CommandName="Page" CommandArgument="First" ID="LinkButton1" runat="server"
                            Style="color: blue">首页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Prev"
                                ID="LinkButton2" runat="server" Style="color: blue">|上一页</asp:LinkButton>
                        <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="LinkButton3" runat="server"
                            Style="color: blue">下一页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Last"
                                ID="LinkButton4" runat="server" Style="color: blue">|尾页</asp:LinkButton>
                        转到<asp:DropDownList ID="pageDDL" runat="server" AutoPostBack="True" OnSelectedIndexChanged="pageDDL_SelectedIndexChanged">
                        </asp:DropDownList>
                    </PagerTemplate>
                    <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#A55129"></HeaderStyle>
                </WXYWControl:CustomGridView>
            </td>
        </tr>
        <tr style="height: 25px">
            <td align="center" style="font-size: 11pt; width: 50%">
                <b>执行人超期排名:</b>
            </td>
            <td align="center" style="font-size: 11pt; width: 50%">
                <b>查询条件</b>
            </td>
        </tr>
        <tr>
            <td align="center" valign="top">
                <WXYWControl:CustomGridView ID="overDuePerpleGridView" CssClass="tableList" runat="server"
                    AutoGenerateColumns="False" AllowPaging="True" PageSize="20" BorderColor="#888888"
                    OnRowDataBound="overDuePerpleGridView_RowDataBound" OnPageIndexChanging="overDuePerpleGridView_PageIndexChanging"
                    OnMustAddARow="OverdueGridView_MustAddARow">
                    <Columns>
                        <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                            <ItemTemplate>
                                <asp:Label ID="IDLbl" runat="server"></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="执行人员" DataField="Person">
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="超期次数" DataField="Times">
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="总任务数" DataField="TotalTasks">
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="超期比例" DataField="Percents" DataFormatString="{0} %">
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="图示">
                            <ItemTemplate>
                                <asp:Image ID="Image1" runat="server" /><%--<asp:Label ID="Label1" runat="server" Text=""></asp:Label>--%>
                            </ItemTemplate>
                            <HeaderStyle Wrap="False" />
                            <ItemStyle Wrap="False" />
                        </asp:TemplateField>
                    </Columns>
                </WXYWControl:CustomGridView>
            </td>
            <td valign="top">
                <table width="100%" style="line-height: 25px; background-color: Olive">
                    <tr>
                        <td>
                            起始年:
                        </td>
                        <td>
                            <asp:DropDownList ID="yearDropDownList" runat="server">
                            </asp:DropDownList>
                            &nbsp; 月:
                            <asp:DropDownList ID="monthDropDownList" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            终止年:
                        </td>
                        <td>
                            <asp:DropDownList ID="tyearDropDownList" runat="server">
                            </asp:DropDownList>
                            &nbsp; 月:
                            <asp:DropDownList ID="tmonthDropDownList" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr align="left">
                        <td>
                            关键字:
                        </td>
                        <td>
                            <asp:TextBox ID="keywordTxtBox" runat="server" Width="200px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr align="left">
                        <td>
                            平台:
                        </td>
                        <td>
                            <asp:DropDownList ID="servicestationDropDownList" runat="server" Width="200px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Button ID="OKButton" runat="server" Text="确定" Width="80px" OnClick="searchButton_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
